Skip to content

[feat][broker] Expose pulsar out bytes and message metrics per topic - #18440

Open
pgier wants to merge 1 commit into
apache:masterfrom
pgier:prometheus-pulsar-out-messages-total-per-topic
Open

[feat][broker] Expose pulsar out bytes and message metrics per topic#18440
pgier wants to merge 1 commit into
apache:masterfrom
pgier:prometheus-pulsar-out-messages-total-per-topic

Conversation

@pgier

@pgier pgier commented Nov 12, 2022

Copy link
Copy Markdown
Contributor

Add prometheus metrics which expose the per topic messages out and bytes out total on a per topic basis. Currently, only the subscription level stats are enabled.

Motivation

There are currently two metrics pulsar_out_bytes_total and pulsar_out_messages_total. The metrics represent the pulsar stats on a per subscription basis. It would be convenient to be able to see the summary of these values per topic similar to the stats exposed by pulsar-admin.

Modifications

Added the two metrics and updated the test to verify that the output is correct.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests, such as (please describe tests). I made an enhancement to the existing Promtheus metrics test.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: pgier#1

Add prometheus metrics which expose the per topic messages out and bytes out total
on a per topic basis.  Currently, only the subscription level stats are enabled.

Signed-off-by: Paul Gier <paul.gier@datastax.com>
@pgier pgier changed the title [feat] [broker] expose out bytes and message metrics per topic [feat] [broker] expose pulsar out bytes and message metrics per topic Nov 12, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Nov 12, 2022
@Technoboy- Technoboy- added this to the 2.12.0 milestone Nov 25, 2022
@Technoboy- Technoboy- changed the title [feat] [broker] expose pulsar out bytes and message metrics per topic [feat][broker] Expose pulsar out bytes and message metrics per topic Nov 25, 2022
@Technoboy- Technoboy- closed this Nov 25, 2022
@Technoboy- Technoboy- reopened this Nov 25, 2022
@codecov-commenter

codecov-commenter commented Nov 25, 2022

Copy link
Copy Markdown

Codecov Report

Merging #18440 (94dc7df) into master (fdf86d3) will decrease coverage by 1.64%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #18440      +/-   ##
============================================
- Coverage     45.67%   44.03%   -1.64%     
- Complexity    10075    18476    +8401     
============================================
  Files           693     1791    +1098     
  Lines         67940   155298   +87358     
  Branches       7273    19054   +11781     
============================================
+ Hits          31030    68392   +37362     
- Misses        33333    79241   +45908     
- Partials       3577     7665    +4088     
Flag Coverage Δ
inttests 23.40% <0.00%> (?)
systests 24.13% <0.00%> (?)
unittests 42.86% <0.00%> (-2.82%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...che/pulsar/broker/stats/prometheus/TopicStats.java 10.59% <0.00%> (+10.59%) ⬆️

... and 1461 files with indirect coverage changes

@github-actions

Copy link
Copy Markdown

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions Bot added the Stale label Dec 26, 2022
@RobertIndie

Copy link
Copy Markdown
Member

/pulsarbot run-failure-checks

@RobertIndie RobertIndie reopened this Apr 11, 2023
@cbornet

cbornet commented Apr 11, 2023

Copy link
Copy Markdown
Contributor

@cbornet cbornet modified the milestones: 3.0.0, 3.1.0 Apr 11, 2023
@github-actions github-actions Bot removed the Stale label Apr 12, 2023
@github-actions

Copy link
Copy Markdown

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions Bot added the Stale label May 13, 2023
@Technoboy- Technoboy- modified the milestones: 3.1.0, 3.2.0 Jul 31, 2023
@Technoboy- Technoboy- modified the milestones: 3.2.0, 3.3.0 Dec 22, 2023
@coderzc coderzc removed this from the 3.3.0 milestone May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants